﻿<%@ Page Language="C#" MasterPageFile="~/Example.master" AutoEventWireup="true" CodeBehind="SumMatrix.aspx.cs"
    Inherits="Demo.Demos.SumMatrix" %>

<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <d:DataContextControlSumMatrix runat="server" ID="ctrl_SumMatrix">
                        <div style="float: right;">
                            <asp:Button runat="server" Text="+ Column" CssClass="btn btn-mini" OnClick="AddColumn_Click" />
                        </div>
                        <table>
                            <cwf:CollectionEditor runat="server" DataPath="Matrix">
                                <ItemTemplate>
                                    <tr>
                                        <cwf:CollectionEditor runat="server" DataPath="this">
                                            <ItemTemplate>
                                                <td style="width: 30px;">
                                                    <cwfj:simpleeditor runat="server" datapath="Value" autopostback="true" width="30" />
                                                </td>
                                            </ItemTemplate>
                                        </cwf:CollectionEditor>
                                    </tr>
                                </ItemTemplate>
                            </cwf:CollectionEditor>
                        </table>
                        <asp:Button runat="server" Text="+ Row" CssClass="btn btn-mini" OnClick="AddRow_Click" />
                        <p>
                            Sum of everything is <b>
                            <cwf:ModelValue runat="server" DataPath="SumAll" /></b>
                            <cwfj:validatorcontrol runat="server" onvalidaterules="Validate_All" />
                        </p>
                        <div class="form-actions">
                            <asp:Button runat="server" Text="Do Something" CssClass="btn btn-primary" OnClick="DoSomething_Click"
                                ID="Save" />
                        </div>
                    </d:DataContextControlSumMatrix>
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
